-
Notifications
You must be signed in to change notification settings - Fork 13.6k
trait_sel: sizedness + auto trait goals prefer alias candidates #144064
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
trait_sel: sizedness + auto trait goals prefer alias candidates #144064
Conversation
This comment has been minimized.
This comment has been minimized.
wrt 6aa3732 it's not that we stop to normalize the predicates of projections, it's that when comfirming alias-bound/ wrt
Did you already crater run this behavior? |
We did a crater run in #142712 (comment), which had all of these changes and included implying |
6aa3732
to
e412062
Compare
Updated the README and corrected the descriptions of everything per your comment |
This comment was marked as resolved.
This comment was marked as resolved.
e412062
to
fa46ce0
Compare
Rebased following #143545 |
This comment was marked as resolved.
This comment was marked as resolved.
For sizedness, default and auto trait predicates, now prefer non-param candidates if any exist. As these traits do not have generic parameters, it never makes sense to prefer an non-alias candidate, as there can never be a more permissive candidate.
No longer require that we prove that the predicates of aliases hold when checking the well-formedness of the alias. This permits more uses of GATs and changes the output of yet more tests.
fa46ce0
to
f1e23b5
Compare
This PR does two relevant changes we need to FCP. We've already tried the first change before in #92191 and then reverted the PR as this caused a regression. The second change is necessary to avoid this regression and is also generally desirable.
|
Team member @lcnr has proposed to merge this. The next step is review by the rest of the tagged team members: No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
Fixes #143992
MetaSized
always holds temporarily #144016 so thatMetaSized
bounds are checked properly, and updates all the tests accordingly, including makingtests/ui/sized-hierarchy/incomplete-inference-issue-143992.rs
fail when it shouldn'ttests/ui/sized-hierarchy/incomplete-inference-issue-143992.rs
passes again, buttests/ui/generic-associated-types/issue-93262.rs
starts failing when it shouldn'ttests/ui/generic-associated-types/issue-93262.rs
passes againEach commit updates all the tests to their new output so it should be easy enough to see what the impact of each change individually is. After all of the changes, tests that pass when they didn't before or vice versa:
tests/ui/extern/extern-types-size_of_val.rs
MetaSized
always holds temporarily #144016, now correctly errorstests/ui/sized-hierarchy/incomplete-inference-issue-143992.rs
MetaSized
always holds temporarily #144016 only applied to the old solver, passing now with 90e61dbtests/ui/sized-hierarchy/overflow.rs
MetaSized
always holds temporarily #144016, now correctly errorstests/ui/generic-associated-types/issue-92096.rs
C::Connecting<'placeholder>: Send
which is required when proving that the generator isSend
. This is an instance of Tracking issue for incorrect lifetime bound errors in async #110338.tests/ui/higher-ranked/trait-bounds/normalize-under-binder/norm-before-method-resolution-opaque-type.rs
This had a crater run in #142712 (comment) alongside some other changes.
r? @lcnr
cc #142712 (this extracts part of that change)